[4.22] Prevent unmanaging VM from CloudStack if it is part of a CKS cluster#12800
[4.22] Prevent unmanaging VM from CloudStack if it is part of a CKS cluster#12800nvazquez wants to merge 3 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12800 +/- ##
=========================================
Coverage 17.61% 17.61%
- Complexity 15661 15667 +6
=========================================
Files 5917 5917
Lines 531423 531433 +10
Branches 64973 64975 +2
=========================================
+ Hits 93586 93597 +11
+ Misses 427280 427279 -1
Partials 10557 10557
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17119 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15632) |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15633) |
|
@blueorangutan test |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 17156 |
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17157 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15671) |
|
@blueorangutan test keepEnv |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15672) |
8935377 to
ac7a0fe
Compare
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17160 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15677) |
|
@blueorangutan test keepEnv |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15678) |
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17168 |
|
@blueorangutan test |
|
@kiranchavala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
kiranchavala
left a comment
There was a problem hiding this comment.
@nvazquez Please provide proper error message when a end user unamanges a instance which is a part of a cks cluster
(localcloud) 🐱 > unmanage virtualmachine id=0aa8147a-1002-49e9-bcc6-5af4b35f05d2
{
"account": "admin",
"accountid": "7f089b6c-21c6-11f1-92f3-1e004e000380",
"cmd": "org.apache.cloudstack.api.command.admin.vm.UnmanageVMInstanceCmd",
"completed": "2026-03-17T07:33:20+0000",
"created": "2026-03-17T07:33:20+0000",
"domainid": "28ca91c8-21c6-11f1-92f3-1e004e000380",
"domainpath": "ROOT",
"jobid": "59a56976-d640-419b-b135-86706c5fee19",
"jobinstanceid": "0aa8147a-1002-49e9-bcc6-5af4b35f05d2",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "No bean named 'com.cloud.kubernetes.cluster.KubernetesServiceHelper' available"
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "7f09fbfa-21c6-11f1-92f3-1e004e000380"
}
🙈 Error: async API failed for job 59a56976-d640-419b-b135-86706c5fee19
The message can be similar to the one when a end user tries to destroy a machine which is part of the cks cluster
Description
This PR prevents unmanaging a VM from CloudStack if it belongs to a CKS cluster
Fixes: #12783
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?